/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controladores;

import java.io.Serializable;
import java.util.StringTokenizer;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.event.ActionEvent;
import org.primefaces.component.menuitem.MenuItem;

/**
 *
 * @author Hermanos
 */
@ManagedBean
@RequestScoped
public class controlOpnciones implements Serializable {
    private static String url=""; 
    private String url1="RegistroPlayas.xhtml";
    private String url2="RegistroMuestreo.xhtml";
    private String url3="RegistroCategoria.xhtml";
    private String url4="RegistroParametros.xhtml";
    private String url5="RegistroResiduo.xhtml";
    private String url6="RegistroRSolido.xhtml";
    private String url7="RegistroDensidad.xhtml";
    private String url8="";
    private String url9="";
    private String url10="RegistroInsitu.xhtml";
    
    
    public controlOpnciones() {
    }
    public static void cerrarSession(){
     url="";
     ControlNavegacion.cerrarSession();
     
    
    }

    public void acccionMenu(ActionEvent event) {
        try {
           String codpuntom ="";
            String codplaya = "";
            MenuItem selectedMenuItem = (MenuItem) event.getComponent();
            String idtoidentify = selectedMenuItem.getAttributes().get("codigo").toString();
            StringTokenizer stk = new StringTokenizer(idtoidentify, "-");
            codpuntom = stk.nextToken();
            codplaya = stk.nextToken();
            controlMuestraResiduo.listarPunUsu(codpuntom, codplaya);
            controlMuestraDensidad.ListarMuestrasPuntoUsu(codpuntom, codplaya);
            controlMuestraFisicoQuimica.listaMuestraFisicoPuntoUsuario(codpuntom, codplaya);
            controlMuestraDensidad.setCodpunto(codpuntom);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
   

    public String getUrl1() {
        return url1;
    }

    public void setUrl1(String url1) {
        this.url1 = url1;
    }

    public String getUrl2() {
        return url2;
    }

    public void setUrl2(String url2) {
        this.url2 = url2;
    }

    public String getUrl3() {
        return url3;
    }

    public void setUrl3(String url3) {
        this.url3 = url3;
    }

    public String getUrl4() {
        return url4;
    }

    public void setUrl4(String url4) {
        this.url4 = url4;
    }

    public String getUrl5() {
        return url5;
    }

    public void setUrl5(String url5) {
        this.url5 = url5;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * @return the url6
     */
    public String getUrl6() {
        return url6;
    }

    /**
     * @param url6 the url6 to set
     */
    public void setUrl6(String url6) {
        this.url6 = url6;
    }

    /**
     * @return the url7
     */
    public String getUrl7() {
        return url7;
    }

    /**
     * @param url7 the url7 to set
     */
    public void setUrl7(String url7) {
        this.url7 = url7;
    }

    /**
     * @return the url8
     */
    public String getUrl8() {
        return url8;
    }

    /**
     * @param url8 the url8 to set
     */
    public void setUrl8(String url8) {
        this.url8 = url8;
    }

    /**
     * @return the url9
     */
    public String getUrl9() {
        return url9;
    }

    /**
     * @param url9 the url9 to set
     */
    public void setUrl9(String url9) {
        this.url9 = url9;
    }

    /**
     * @return the url10
     */
    public String getUrl10() {
        return url10;
    }

    /**
     * @param url10 the url10 to set
     */
    public void setUrl10(String url10) {
        this.url10 = url10;
    }
}
